﻿using Microsoft.Synchronization.Data;

namespace Cesave.Application.Permisos.SynchronizationService
{
	public partial class PermisosCacheClientSyncProvider
	{
		public void AddHandlers()
		{
			ApplyChangeFailed += PermisosCacheClientSyncProvider_ApplyChangeFailed;
		}

		private void PermisosCacheClientSyncProvider_ApplyChangeFailed(object sender, Microsoft.Synchronization.Data.ApplyChangeFailedEventArgs e)
		{
			ConflictResolver.ClientDeleteServerUpdateAction = ResolveAction.ServerWins;
			ConflictResolver.ClientUpdateServerDeleteAction = ResolveAction.ClientWins;
			ConflictResolver.ClientInsertServerInsertAction = ResolveAction.ClientWins;
			ConflictResolver.ClientUpdateServerUpdateAction = ResolveAction.ClientWins;
		}
	}
}
